package org.xjc.config.securitycomponent;
/*
 * @Author : XJC
 * @Time : 2021/12/12 21:09
 * @Description :
 *
 */

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;


@ConfigurationProperties(prefix = "jwt")
@Configuration
public class JwtProperties {

    /**
     * 获取请求头中token的key
     */
    private String tokenHeader = "Authorization";

    private String secret;

    private int expiration = 604800;

    /**
     * token中头信息，即token以这个开头
     */
    private String tokenHead = "Bearer";


    public String getTokenHeader() {
        return tokenHeader;
    }

    public void setTokenHeader(String tokenHeader) {
        this.tokenHeader = tokenHeader;
    }

    public String getSecret() {
        return secret;
    }

    public void setSecret(String secret) {
        this.secret = secret;
    }

    public int getExpiration() {
        return expiration;
    }

    public void setExpiration(int expiration) {
        this.expiration = expiration;
    }

    public String getTokenHead() {
        return tokenHead;
    }

    public void setTokenHead(String tokenHead) {
        this.tokenHead = tokenHead;
    }
}
